package com.example.categorygroup.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.categorygroup.R;
import com.example.categorygroup.data.CategoryValuesEntity;
import com.example.loadimage.LoadImage;

import org.jetbrains.annotations.NotNull;

public class CategroyValuesAdapter extends BaseQuickAdapter<CategoryValuesEntity.DataBean, BaseViewHolder> {
    public CategroyValuesAdapter() {
        super(R.layout.item_categroy_values);
    }


    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, CategoryValuesEntity.DataBean dataBean) {
        baseViewHolder.setText(R.id.category_value_item_tv,dataBean.getCategory_name());
        ImageView img = baseViewHolder.getView(R.id.category_value_item_img);
        LoadImage.loadMatchImg((String) dataBean.getCategory_icon(),img);
    }
}
